package session08.practise;

import javax.swing.*;
import java.awt.*;

public class PicturePanel extends JPanel {

    private ImagePanel[] imgPArray;

    public PicturePanel() {
        this.setLayout(new CardLayout());

        this.imgPArray = new ImagePanel[4];
        for (int i = 0; i < 4; i++) {
            this.imgPArray[i] = new ImagePanel("img/" + (i + 1) + ".jpg");
            this.add(i + "", this.imgPArray[i]);
        }
    }
}
